start;
fIMU = fopen('2021-7-9-22-43-34.m16','rb');

ns = 100;                       % 采样率
maxlen = 7200*ns;             % 初始最大数据长度
imu = zeros(maxlen,16);      % 数据矩阵
k=1;

while 1
    syscntms = fread(fIMU,1,'int32');
    if (isempty(syscntms))
        break;
    end
    imu(k,1) = syscntms;
    imu(k,2:10) = fread(fIMU,9,'int32');
    imu(k,11:16) = fread(fIMU,6,'single');
    k = k+1;
end

fclose(fIMU);

imu = imu(1:k-1,:);

